package com.demo;


public class EnumDemo3 {

    public static void main(String[] args) {
//		Food food  = Coffee.BLACK_COFFEE;
//		System.out.println(food);
        //遍历 枚举
        for (Food.Coffee coffee : Food.Coffee.values()) {
            System.out.println(coffee + "  ");
        }
    }
}

/*
用法六：使用接口组织枚举
*/
interface Food {
    enum Coffee implements Food{
        BLACK_COFFEE,DECAF_COFFEE,LATTE,CAPPUCCINO
    }
    //甜点
    enum Dessert implements Food{
        //水果蛋糕冰激凌
        FRUIT, CAKE, GELATO
    }
} 

